<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>环境检测 - Powered by {:C('SYSTEM_WEBNAME')}</title>
	<Pintuer />
	<Layer />
	<style>
	.body-box{
		position: absolute;
		top:100px;
		left:300px;
		right:300px;
		bottom:150px;
		background: rgba(255,255,255,0.5);
		box-shadow: 1px 1px 3px;
	}
	.install-box{
		width:100%;
		height:100%;
	}
	.logo{
		background: #394049;
		height:60px;
	}
	.content{
		height:80%;
		overflow:auto;
		border-bottom:#FFF 1px solid;
		margin-bottom:10px;
		padding-top:10px;
		padding-left:10px;
	}
	.text-block{
		display: block;
	}
	</style>
</head>
<body class="bg-blue">
	<div class="body-box">
		<div class="install-box">
			<div class="logo">
				<div class="line">
					<div class="x2">
						<img src="__PUBLIC__/images/logo.png" width="200" height="60">
					</div>
					<div class="x10 padding-big-top">
						<span class="text-white text-big">环境检测</span>
					</div>
				</div>
			</div>
			<div class="content">
				<div class="line margin-top">
					<div class="x4 text-right padding-right padding-small-top">
						safe模块：
					</div>
					<div class="x8 padding-small-top">
						{$safe}
					</div>
				</div>
				<div class="line margin-top">
					<div class="x4 text-right padding-right padding-small-top">
						GD库：
					</div>
					<div class="x8 padding-small-top">
						{$gd}
					</div>
				</div>
				<div class="line margin-top">
					<div class="x4 text-right padding-right padding-small-top">
						mod_rewrite：
					</div>
					<div class="x8 padding-small-top">
						{$mod_rewrite}
					</div>
				</div>
				<div class="line margin-top">
					<div class="x4 text-right padding-right padding-small-top">
						CURL扩展：
					</div>
					<div class="x8 padding-small-top">
						{$curl}
					</div>
				</div>
				<div class="line margin-top">
					<div class="x4 text-right padding-right padding-small-top">
						Mysqli：
					</div>
					<div class="x8 padding-small-top">
						{$mysqli}
					</div>
				</div>
				<div class="line margin-top">
					<div class="x4 text-right padding-right padding-small-top">
						mb_substr：
					</div>
					<div class="x8 padding-small-top">
						{$mb_substr}
					</div>
				</div>
				<div class="line margin-top">
					<div class="x4 text-right padding-right padding-small-top">
						目录权限：
					</div>
					<div class="x8 padding-small-top">
						<?php foreach ($dir as $key => $ret): ?>
							<label class="text-block">
								<?php echo $ret; ?>
								<?php if (file_exists($ret)): ?>
									<span class="text-main">权限正常！</span>
								<?php else: ?>
									<span class="text-red">没有权限！</span>
								<?php endif ?>
							</label>
						<?php endforeach; ?>
					</div>
				</div>
			</div>
			<div class="text-center margin-big-top">
				<button type="button" onclick="window.location.href='{:U('index')}'" class="button bg-red">
					上一步
				</button>
				<button type="button" onclick="check('{:U('database')}');" class="button bg-green">
					下一步
				</button>
			</div>
		</div>
	</div>
	<script>
		// 环境检测
    	function check(url){
    		if($('.text-red').length>0){
    			layer.confirm('安装环境与目录权限不通过！请检查再进行安装。');
    			return false;
    		}
    		window.location.href = url;
    	}
    </script>
</body>
</html>